﻿using AutoMapper;
using BS.Domain.Address;
using BS.Domain.Cultivation;
using BS.Domain.RBAC;
using BS.Domain.Slaughter;
using BS.Domain.traceability;
using BS.Read.Api.Handler.Addresss;

namespace BS.Read.Api
{
    public class MyMapping:Profile
    {
        public MyMapping()
        {
            //创建映射
            CreateMap<UserInfo, GetUserWithRoleReponseDTO>().ReverseMap();
            CreateMap<Permissions, GetPermissionsReponseDTO>().ReverseMap();
            //--------溯源操作的映射
            CreateMap<traceabilitable, GetTranceShuoYuanCommandPonse>().ReverseMap();
            CreateMap<traceabilitable, GetTranceShuoYuanByIdCommand>().ReverseMap();
            CreateMap<Goods, GetGoodsListCommandPonse>().ReverseMap();
            CreateMap<traceabilitable, GetTraceableCommandReponse>().ReverseMap();
            //------------养殖操作的映射
            CreateMap<Breedings, GetBreedsingReponseDTO>().ReverseMap();
            CreateMap<Breedings, GetBreedsingByIdRequestDTO>().ReverseMap();

            CreateMap<BreedingEnterprises, GetBreedingEnterprisesListReponseDTO>().ReverseMap();

            CreateMap<Imunitys,GetImuntityListCommandPonse>().ReverseMap();
            CreateMap<Imunitys,BackImuntitableCommand>().ReverseMap();
            //-------------屠宰操作的映射
            CreateMap<Slaughters, GetSlaughterListReponseDTO>().ReverseMap();

            CreateMap<GetSlaughterEnterListReponseDTO,SlaughterEnterprise>().ReverseMap();
            //--------------------
            CreateMap<Address, ShowAddressReponseDTO>().ReverseMap();
        }
    }
}
